#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,t;
	cin>>a>>b;
	cout<<a<<endl<<b<<endl;
	if(10 <= b && b < 100)
	{
		if(b%10)
			cout<<b%10*a<<endl;
		else
		{
			int cnt = 0, x = a;
			while(x)
			{
				cnt++;
				x /= 10;
			}
			for(int i = 1;i <= cnt;i++)
				cout<<"0";
			cout<<endl;
		}
		cout<<b/10*a<<endl;
	}
	else if(b == 100)
	{
		cout<<b%10*a<<endl;
		cout<<b/10%10*a<<endl;
		cout<<b/100*a<<endl;
	}
	cout<<a*b<<endl;
    return 0;
}
